Test Pelco D Protocol with Comm Operator

Comm Operator is a professional test or debug application for serial port and network communication. We use it to test lots of serial port and network communication protocols. Here will show you how to use Comm Operator to test Pelco D protocol.

Pelco D protocol is a popular control protocol for Pan/ Tilt/ Zoom camera or Pan/Tilt head. The format for a control command consists of 7 Hexadecimal bytes.

Byte1 Byte2 Byte3 Byte4 Byte5 Byte6 Byte7
Sync
Address
Command1 Command2
Data1 Data2 Checksum
  • Sync: always 0xFF
  • Address: camera address
  • Checksum: sum of bytes 2 to bytes 6

Here are Pelco D standard commands and some extended commands for address 1 (0x01).

Pelco-D-Command List Standard Commands and Extended Commands

It’s very easy to test the above Pelco D command list with Comm Operator software. You don’t need to calculate the checksum for each command. The Checksum will be added and sent out automatically in Comm Operator.

1. Be sure you have Pelco D PTZ Camera or Pan/Tilt head connected with your computer by RS232 serial port or USB.

2. Download, install and launch Comm Operator software.

3. Click the icon to show Open Connection panel, select Com Port and Baud Rate, keep other options default.

Comm Operator - Open Connection for Pelco D protocol

The connection status will be shown on the bottom of status bar.

Comm Operator - Connection Status

4.  Click menu View – Structured Data to show  Quick Send – Structured Data panel.

Comm Operator - View - Structured Data

Comm Operator - Quick Send - Structured Data

5.  Click Edit button to open Edit Structured Data panel.

  • Check New button to add Sync Byte, Address, Command 1, Command 2, Data 1, and Data 2 one by one in order. Those are the Byte 1 to Byte 6 for Pelco D commands.

Comm Operator - Edit Structured Data

  • Click New Var button to add checksum. This is the Byte 7. Checksum is the sum of Byte 2 to Byte 6, that is Address, Command 1, Command 2, Data 1 and Data 2. 

Comm Operator - Edit Structured Data - Checksum

6. After above editing, you will get Quick Send – Structured Data panel special for Pelco D protocol.

Comm Operator - Quick Send - Structured Data - Pelco D Command

7. It’s ready to send Pelco D command. The default address is 1. It’s editable.

  • Edit Command 1, Command 2, Data 1 and Data 2 according to Pelco D commands
  • Click Send button, the checksum will be added to the end of send data automatically

Comm Operator - Quick Send - Structured Data - Pelco D Command - Checksum

If you check the option Add to List, you will see the command is also added to the Send Data List. You can modify the Name for it by Edit it.

8. Follow the step 7, you can have Pelco D command list in several minutes.

Comm Operator - Pelco D Commands

9. For some extended commands, like Set Pan/Tilt/Zoom absolute position, you can use Comm Operator built-in Calculator to get the hexadecimal data for MSB and LSB.

For example:   Set 90 degree for Pan position

According to the instruction of Pelco D protocol manual, Pan position is given in hundredths of a degree and has a range from 0 to 35999 (decimal). The value to set pan 90 degrees should be 9000.

  • Click the icon to open Calculator panel
  • Input 9000, click Update
  • Output Hex 0x2328 for Decimal 9000 
    • 23 is MSB in hexadecimal, it’s for Data 1
    • 28 is LSB in hexadecimal, it’s for Data 2

Comm Operator - Pelco D - Set Pan Position - Calculator

10. If you send Query Tilt Position and receive the return value, you can also use the Calculator to get the decimal data for the tilt position. Here shows the return MSB and LSB 0x1080. It indicates the Tilt position is  42.24 degrees.

Comm Operator - Pelco D - Set Tilt Position - Calculator

 

Back to Comm Operator homepage